

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Structure building routines &mdash; quippy 7ea04c5+ documentation</title>
  

  
  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "math|output_area", "processEscapes": true, "ignoreClass": "document", "inlineMath": [["$", "$"], ["\\(", "\\)"]]}})</script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> quippy
          

          
            
            <img src="_static/hybrid.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                7ea04c5+
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
    
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to <code class="docutils literal notranslate"><span class="pre">quippy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation of QUIP and quippy</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="quippy.html">Quippy library reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quippy.html#core-functionality">Core functionality</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="quippy.html#structure-generation-manipulation-and-analysis">Structure generation, manipulation and analysis</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">Structure building routines</a><ul class="simple">
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="descriptors.html">Descriptors for atomic environments</a></li>
<li class="toctree-l3"><a class="reference internal" href="crack.html">Tools for fracture simulations</a></li>
<li class="toctree-l3"><a class="reference internal" href="clusters.html">Cluster carving routines</a></li>
<li class="toctree-l3"><a class="reference internal" href="find_surface_atoms.html">Identification of atoms on surfaces</a></li>
<li class="toctree-l3"><a class="reference internal" href="real_space_covariance.html">Real-space covariance representation of atomic environments</a></li>
<li class="toctree-l3"><a class="reference internal" href="topology.html">Some utilities for topological analysis</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#molecular-dynamics">Molecular Dynamics</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#additional-tools-for-potentials">Additional tools for Potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#mathematical-and-optimisation-tools">Mathematical and optimisation tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#units-data-and-constants">Units, Data and Constants</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#low-level-routines-and-datatypes">Low level routines and datatypes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="visualisation.html">Visualisation Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a></li>
<li class="toctree-l1"><a class="reference internal" href="teach_sparse.html">Command line options of the teach_sparse main program</a></li>
</ul>

            
          
    <p></p>
    <ul>
        <li><a href="genindex.html">Index</a></li>
        <li><a href="py-modindex.html">Module Index</a></li>
        <li><a href="search.html">Search Page</a></li>
        <li><a href="_modules/index.html">Module Source Code</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">quippy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
          <li><a href="quippy.html">Quippy library reference</a> &raquo;</li>
        
      <li>Structure building routines</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/structures.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  
<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
    margin-bottom: 19px;  /* padding has already 5px */
}

/* ... except between code cells! */
.nblast + .nbinput {
    margin-top: -19px;
}

.admonition > p:before {
    margin-right: 4px;  /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
    text-align: unset;
}
</style>
<div class="section" id="module-quippy.structures">
<span id="structure-building-routines"></span><h1>Structure building routines<a class="headerlink" href="#module-quippy.structures" title="Permalink to this headline">¶</a></h1>
<p>This module contains a variety of structure generating routines.</p>
<p>Module contents for <a class="reference internal" href="#module-quippy.structures" title="quippy.structures: Structure building routines"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy.structures</span></code></a>:</p>
<p class="rubric">Classes</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.MillerIndex" title="quippy.structures.MillerIndex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MillerIndex</span></code></a></td>
<td>Representation of a three of four index Miller direction or plane</td>
</tr>
</tbody>
</table>
<p class="rubric">Functions</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.void_analysis" title="quippy.structures.void_analysis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">void_analysis</span></code></a>(at,grid_size,cutoff,grid,radii)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.alpha_quartz_cubic" title="quippy.structures.alpha_quartz_cubic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">alpha_quartz_cubic</span></code></a>(a,c,u,x,y,z)</td>
<td>Non-primitive 18-atom cubic quartz cell</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.find_closest" title="quippy.structures.find_closest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">find_closest</span></code></a>(at,r,n0)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.sh2" title="quippy.structures.sh2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sh2</span></code></a>(a,c,[z])</td>
<td>Creates a 2-atom simple hexagonal lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">c</span></code></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.find_compatible_supercells" title="quippy.structures.find_compatible_supercells"><code class="xref py py-obj docutils literal notranslate"><span class="pre">find_compatible_supercells</span></code></a>(…)</td>
<td>find supercells of two lattices that are compatible (i.e.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.imma" title="quippy.structures.imma"><code class="xref py py-obj docutils literal notranslate"><span class="pre">imma</span></code></a>(a,b,c,u,[z])</td>
<td>Creates a 2-atom Imma cell</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.graphite_rhombohedral" title="quippy.structures.graphite_rhombohedral"><code class="xref py py-obj docutils literal notranslate"><span class="pre">graphite_rhombohedral</span></code></a>(a,c,[z])</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.fcc_z111_ortho" title="quippy.structures.fcc_z111_ortho"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fcc_z111_ortho</span></code></a>(a0)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.find_motif" title="quippy.structures.find_motif"><code class="xref py py-obj docutils literal notranslate"><span class="pre">find_motif</span></code></a>(…)</td>
<td>Subgraph isomorphism identifier based on J.R.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.diamond" title="quippy.structures.diamond"><code class="xref py py-obj docutils literal notranslate"><span class="pre">diamond</span></code></a>(a,[z])</td>
<td>Creates an 8-atom diamond-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code> and atomic number <code class="docutils literal notranslate"><span class="pre">Z</span></code>, e.g.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.unit_slab" title="quippy.structures.unit_slab"><code class="xref py py-obj docutils literal notranslate"><span class="pre">unit_slab</span></code></a>(axes,a,[atnum,lat_type,c,u,x,y,z])</td>
<td>Return a slab of material with the x, y, and z axes desribed by the Miller indices in the array axes (with <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">=</span> <span class="pre">axes[:,1])</span></code>, <code class="docutils literal notranslate"><span class="pre">y</span> <span class="pre">=</span> <span class="pre">axes[:,2]</span></code> and <code class="docutils literal notranslate"><span class="pre">z</span> <span class="pre">=</span> <span class="pre">axes[:,3]</span></code>).</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.fcc1" title="quippy.structures.fcc1"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fcc1</span></code></a>(a,[z])</td>
<td>Creates a 1-atom fcc-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.remove_too_close_atoms" title="quippy.structures.remove_too_close_atoms"><code class="xref py py-obj docutils literal notranslate"><span class="pre">remove_too_close_atoms</span></code></a>(at,distance,[error])</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.bulk" title="quippy.structures.bulk"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bulk</span></code></a>(lat_type,a,[c,u,x,y,z,atnum])</td>
<td>Construct a bulk primitive cell with a given lattice type and lattice parameters</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.supercell" title="quippy.structures.supercell"><code class="xref py py-obj docutils literal notranslate"><span class="pre">supercell</span></code></a>(…)</td>
<td>Replicates the unit cell <code class="docutils literal notranslate"><span class="pre">n1*n2*n3</span></code> times along the lattice vectors.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.structure_from_file" title="quippy.structures.structure_from_file"><code class="xref py py-obj docutils literal notranslate"><span class="pre">structure_from_file</span></code></a>(…)</td>
<td>create a supercell of a structure, read from a file, with chosen volume per atom or volume per unit cell, with desired supercell repeats, and specified Z values.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.map_nearest_atoms" title="quippy.structures.map_nearest_atoms"><code class="xref py py-obj docutils literal notranslate"><span class="pre">map_nearest_atoms</span></code></a>(at1,at2,types)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.fcc_z100" title="quippy.structures.fcc_z100"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fcc_z100</span></code></a>(a0)</td>
<td>Make an FCC 100 surface, such that the repeating squares of the surface are aligned with the cell boundaries</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.min_neighbour_dist" title="quippy.structures.min_neighbour_dist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">min_neighbour_dist</span></code></a>(at)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.rutile" title="quippy.structures.rutile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rutile</span></code></a>(a,c,u)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.fcc_disloc_malc" title="quippy.structures.fcc_disloc_malc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fcc_disloc_malc</span></code></a>(a0,nu,n1,n2,n3,d,type)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.graphite" title="quippy.structures.graphite"><code class="xref py py-obj docutils literal notranslate"><span class="pre">graphite</span></code></a>(a,c,[z])</td>
<td>Creates a 4-atom graphite lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">c</span></code></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.tube_radius" title="quippy.structures.tube_radius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tube_radius</span></code></a>(tube)</td>
<td>Calcualte average radius of a nanotube</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.transform" title="quippy.structures.transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">transform</span></code></a>(at_in,t)</td>
<td>Transform cell and lattice coordinates by the 3 x 3 matrix <cite>t</cite></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.graphene_tube" title="quippy.structures.graphene_tube"><code class="xref py py-obj docutils literal notranslate"><span class="pre">graphene_tube</span></code></a>(a,n,m,nz)</td>
<td>Construct a <span class="math notranslate nohighlight">\((n,m)\)</span> nanotube with lattice parameter <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">nz</span></code> unit cells along the tube length.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.fcc_z111" title="quippy.structures.fcc_z111"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fcc_z111</span></code></a>(a0)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.graphene_cubic" title="quippy.structures.graphene_cubic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">graphene_cubic</span></code></a>(a)</td>
<td>Cubic graphene unit cell with lattice parameter <code class="docutils literal notranslate"><span class="pre">a</span></code>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.hcp" title="quippy.structures.hcp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hcp</span></code></a>(a,[z])</td>
<td>Creates a 2-atom hcp lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.graphene_sheet" title="quippy.structures.graphene_sheet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">graphene_sheet</span></code></a>(a,n,m,rep_x,rep_y)</td>
<td>Construct a graphene sheet of index <span class="math notranslate nohighlight">\((n,m)\)</span> with lattice constant <code class="docutils literal notranslate"><span class="pre">a</span></code> with <code class="docutils literal notranslate"><span class="pre">rep_x</span></code> repeat units in the <span class="math notranslate nohighlight">\(x\)</span> direction and <code class="docutils literal notranslate"><span class="pre">rep_y</span></code> in the <span class="math notranslate nohighlight">\(y\)</span> direction.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.beta_tin" title="quippy.structures.beta_tin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">beta_tin</span></code></a>(a,c,[z])</td>
<td>Creates a 2-atom beta-tin structure with lattice constants of a and c</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.graphene_slab" title="quippy.structures.graphene_slab"><code class="xref py py-obj docutils literal notranslate"><span class="pre">graphene_slab</span></code></a>(a,theta,width,height)</td>
<td>Construct a slab of graphene of a given with and height, at a given angle.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.imma4" title="quippy.structures.imma4"><code class="xref py py-obj docutils literal notranslate"><span class="pre">imma4</span></code></a>(a,b,c,u,[z])</td>
<td>Creates a 4-atom Imma cell</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.beta_tin4" title="quippy.structures.beta_tin4"><code class="xref py py-obj docutils literal notranslate"><span class="pre">beta_tin4</span></code></a>(a,c,[z])</td>
<td>Creates a 4-atom beta-tin structure with lattice constants of a and c</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.wurtzite" title="quippy.structures.wurtzite"><code class="xref py py-obj docutils literal notranslate"><span class="pre">wurtzite</span></code></a>(a,[c,z1,z2,u])</td>
<td>Creates a 4-atom wurtzite lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">c</span></code></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.anatase_cubic" title="quippy.structures.anatase_cubic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">anatase_cubic</span></code></a>(a,c,u)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.bond_angle_mean_dev" title="quippy.structures.bond_angle_mean_dev"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bond_angle_mean_dev</span></code></a>(at)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.alpha_quartz" title="quippy.structures.alpha_quartz"><code class="xref py py-obj docutils literal notranslate"><span class="pre">alpha_quartz</span></code></a>(a,c,u,x,y,z)</td>
<td>Primitive 9-atom trigonal alpha quartz cell, with lattice constants <cite>a</cite> and <cite>c</cite> and internal coordinates <cite>u</cite> (Si), <cite>x</cite>, <cite>y</cite> and <cite>z</cite> (O).</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.water" title="quippy.structures.water"><code class="xref py py-obj docutils literal notranslate"><span class="pre">water</span></code></a>()</td>
<td>Return an atoms object containing one TIP3P water molecule in a box giving the correct density at 300K</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.fcc" title="quippy.structures.fcc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fcc</span></code></a>(a,[z])</td>
<td>Creates a 4-atom fcc-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.delaunay_reduce" title="quippy.structures.delaunay_reduce"><code class="xref py py-obj docutils literal notranslate"><span class="pre">delaunay_reduce</span></code></a>(lat)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.fcc_11b2_edge_disloc" title="quippy.structures.fcc_11b2_edge_disloc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fcc_11b2_edge_disloc</span></code></a>(a0,n1,n2,n3)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.disloc_noam" title="quippy.structures.disloc_noam"><code class="xref py py-obj docutils literal notranslate"><span class="pre">disloc_noam</span></code></a>(at,p,l,b,[close_threshold])</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.bcc" title="quippy.structures.bcc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bcc</span></code></a>(a,[z])</td>
<td>Creates a 2-atom bcc-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.bcc1" title="quippy.structures.bcc1"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bcc1</span></code></a>(a,[z])</td>
<td>Creates a 1-atom primitive bcc-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.sh" title="quippy.structures.sh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sh</span></code></a>(a,c,[z])</td>
<td>Creates a 1-atom simple hexagonal lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">c</span></code></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.arbitrary_supercell" title="quippy.structures.arbitrary_supercell"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arbitrary_supercell</span></code></a>(a_in,i1,[error])</td>
<td>construct an arbitrary supercell from a primitive structure and a combination of primitive vectors that form supercell</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.diamond2" title="quippy.structures.diamond2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">diamond2</span></code></a>(a,[z1,z2])</td>
<td>Creates a 2-atom diamond-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.surface_unit_cell" title="quippy.structures.surface_unit_cell"><code class="xref py py-obj docutils literal notranslate"><span class="pre">surface_unit_cell</span></code></a>(…)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.slab" title="quippy.structures.slab"><code class="xref py py-obj docutils literal notranslate"><span class="pre">slab</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">slab</span></code> containing multiple routines:</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.orthorhombic_slab" title="quippy.structures.orthorhombic_slab"><code class="xref py py-obj docutils literal notranslate"><span class="pre">orthorhombic_slab</span></code></a>(at[,&nbsp;tol,&nbsp;min_nrep,&nbsp;…])</td>
<td>Try to construct an orthorhombic cell equivalent to the primitive cell <cite>at</cite>, using supercells up to at most <cite>max_nrep</cite> repeats.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.rotation_matrix" title="quippy.structures.rotation_matrix"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rotation_matrix</span></code></a>(unit,&nbsp;y[,&nbsp;z,&nbsp;x,&nbsp;tol])</td>
<td>Return 3x3 matrix rotation matrix defining a crack with open surface defined by the plane <cite>y`=(l,m.n) or (h,k,i,l), and either crack tip line `z</cite> or crack propagation direction <cite>x</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.get_bulk_params" title="quippy.structures.get_bulk_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_bulk_params</span></code></a>(bulk,&nbsp;lat_type[,&nbsp;verbose])</td>
<td>Return 6-tuple of lattice parameters a, c, u, x, y, z for cell <cite>bulk</cite> of lattice type <cite>lat_type</cite></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.get_bond_lengths" title="quippy.structures.get_bond_lengths"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_bond_lengths</span></code></a>(at)</td>
<td>Return a dictionary mapping tuples (Species1, Species2) to an farray of bond-lengths</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.MillerPlane" title="quippy.structures.MillerPlane"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MillerPlane</span></code></a>(v)</td>
<td>Special case of <a class="reference internal" href="#quippy.structures.MillerIndex" title="quippy.structures.MillerIndex"><code class="xref py py-class docutils literal notranslate"><span class="pre">MillerIndex</span></code></a> with <code class="docutils literal notranslate"><span class="pre">type=&quot;plane&quot;</span></code></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.MillerDirection" title="quippy.structures.MillerDirection"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MillerDirection</span></code></a>(v)</td>
<td>Special case of <a class="reference internal" href="#quippy.structures.MillerIndex" title="quippy.structures.MillerIndex"><code class="xref py py-class docutils literal notranslate"><span class="pre">MillerIndex</span></code></a> with <code class="docutils literal notranslate"><span class="pre">type=&quot;direction&quot;</span></code> (the default)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.angle_between" title="quippy.structures.angle_between"><code class="xref py py-obj docutils literal notranslate"><span class="pre">angle_between</span></code></a>(a,&nbsp;b)</td>
<td>Angle between crystallographic directions between a=[ijk] and b=[lmn], in radians.</td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes</p>
<table border="1" class="docutils">
<colgroup>
<col width="81%" />
<col width="19%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Value</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="xref py py-attr docutils literal notranslate"><span class="pre">quartz_params</span></code></td>
<td>—</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="quippy.structures.MillerIndex">
<em class="property">class </em><code class="descclassname">quippy.structures.</code><code class="descname">MillerIndex</code><a class="reference internal" href="_modules/quippy/structures.html#MillerIndex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.MillerIndex" title="Permalink to this definition">¶</a></dt>
<dd><p>Representation of a three of four index Miller direction or plane</p>
<p>A <a class="reference internal" href="#quippy.structures.MillerIndex" title="quippy.structures.MillerIndex"><code class="xref py py-class docutils literal notranslate"><span class="pre">MillerIndex</span></code></a> can be constructed from vector or parsed from a string:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">x</span> <span class="o">=</span> <span class="n">MillerIndex</span><span class="p">(</span><span class="s1">&#39;-211&#39;</span><span class="p">)</span>
<span class="n">y</span> <span class="o">=</span> <span class="n">MillerIndex</span><span class="p">(</span><span class="s1">&#39;111&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s1">&#39;plane&#39;</span><span class="p">)</span>
<span class="n">z</span> <span class="o">=</span> <span class="n">x</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
<span class="nb">print</span> <span class="n">x</span> <span class="c1"># prints &quot;[-211]&quot;</span>
<span class="nb">print</span> <span class="n">y</span> <span class="c1"># prints &quot;(111)&quot;, note round brackets denoting a plane</span>
<span class="nb">print</span> <span class="n">z</span><span class="o">.</span><span class="n">latex</span><span class="p">()</span>
<span class="k">assert</span><span class="p">(</span><span class="n">angle_between</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">)</span> <span class="o">==</span> <span class="n">pi</span><span class="o">/</span><span class="mf">2.</span><span class="p">)</span>
<span class="k">assert</span><span class="p">(</span><span class="n">angle_between</span><span class="p">(</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">)</span> <span class="o">==</span> <span class="n">pi</span><span class="o">/</span><span class="mf">2.</span><span class="p">)</span>
<span class="k">assert</span><span class="p">(</span><span class="n">angle_between</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">z</span><span class="p">)</span> <span class="o">==</span> <span class="n">pi</span><span class="o">/</span><span class="mf">2.</span><span class="p">)</span>
</pre></div>
</div>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.MillerIndex.latex" title="quippy.structures.MillerIndex.latex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">latex</span></code></a>()</td>
<td>Format this <a class="reference internal" href="#quippy.structures.MillerIndex" title="quippy.structures.MillerIndex"><code class="xref py py-class docutils literal notranslate"><span class="pre">MillerIndex</span></code></a> as a LaTeX string</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.structures.MillerIndex.parse" title="quippy.structures.MillerIndex.parse"><code class="xref py py-obj docutils literal notranslate"><span class="pre">parse</span></code></a>(s)</td>
<td>Parse a Miller index string</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.structures.MillerIndex.simplify" title="quippy.structures.MillerIndex.simplify"><code class="xref py py-obj docutils literal notranslate"><span class="pre">simplify</span></code></a>()</td>
<td>Simplify by dividing through by greatest common denominator</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="quippy.structures.MillerIndex.hat">
<code class="descname">hat</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.MillerIndex.hat" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a normalised copy of this array</p>
</dd></dl>

<dl class="method">
<dt id="quippy.structures.MillerIndex.latex">
<code class="descname">latex</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#MillerIndex.latex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.MillerIndex.latex" title="Permalink to this definition">¶</a></dt>
<dd><p>Format this <a class="reference internal" href="#quippy.structures.MillerIndex" title="quippy.structures.MillerIndex"><code class="xref py py-class docutils literal notranslate"><span class="pre">MillerIndex</span></code></a> as a LaTeX string</p>
</dd></dl>

<dl class="method">
<dt id="quippy.structures.MillerIndex.normalised">
<code class="descname">normalised</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#MillerIndex.normalised"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.MillerIndex.normalised" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a normalised copy of this array</p>
</dd></dl>

<dl class="classmethod">
<dt id="quippy.structures.MillerIndex.parse">
<em class="property">classmethod </em><code class="descname">parse</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#MillerIndex.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.MillerIndex.parse" title="Permalink to this definition">¶</a></dt>
<dd><p>Parse a Miller index string</p>
<dl class="docutils">
<dt>Negative indices can be denoted by:</dt>
<dd><ol class="first last arabic simple">
<li>leading minus sign, e.g. <code class="docutils literal notranslate"><span class="pre">[11-2]</span></code></li>
<li>trailing <code class="docutils literal notranslate"><span class="pre">b</span></code> (for ‘bar’), e.g. <code class="docutils literal notranslate"><span class="pre">112b</span></code></li>
<li>LaTeX <code class="docutils literal notranslate"><span class="pre">\bar{}</span></code>, e.g. <code class="docutils literal notranslate"><span class="pre">[11\bar{2}]</span></code> (which renders as <span class="math notranslate nohighlight">\([11\bar{2}]\)</span> in LaTeX)</li>
</ol>
</dd>
</dl>
<p>Leading or trailing brackets of various kinds are ignored.
i.e. <code class="docutils literal notranslate"><span class="pre">[001]</span></code>, <code class="docutils literal notranslate"><span class="pre">{001}</span></code>, <code class="docutils literal notranslate"><span class="pre">(001)</span></code>, <code class="docutils literal notranslate"><span class="pre">[001]</span></code>, <code class="docutils literal notranslate"><span class="pre">&lt;001&gt;</span></code>, <code class="docutils literal notranslate"><span class="pre">001</span></code> are all equivalent.</p>
<p>Returns an array of components (i,j,k) or (h,k,i,l)</p>
</dd></dl>

<dl class="method">
<dt id="quippy.structures.MillerIndex.simplify">
<code class="descname">simplify</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#MillerIndex.simplify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.MillerIndex.simplify" title="Permalink to this definition">¶</a></dt>
<dd><p>Simplify by dividing through by greatest common denominator</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="quippy.structures.void_analysis">
<code class="descclassname">quippy.structures.</code><code class="descname">void_analysis</code><span class="sig-paren">(</span><em>at</em>, <em>grid_size</em>, <em>cutoff</em>, <em>grid</em>, <em>radii</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.void_analysis" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>grid_size</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>cutoff</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>grid</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-2 array(‘d’) with bounds (qp_n0,qp_n1)</span></dt>
<dd></dd>
<dt><strong>radii</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-1 array(‘d’) with bounds (qp_n2)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">void_analysis</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.alpha_quartz_cubic">
<code class="descclassname">quippy.structures.</code><code class="descname">alpha_quartz_cubic</code><span class="sig-paren">(</span><em>a</em>, <em>c</em>, <em>u</em>, <em>x</em>, <em>y</em>, <em>z</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.alpha_quartz_cubic" title="Permalink to this definition">¶</a></dt>
<dd><p>Non-primitive 18-atom cubic quartz cell</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>x</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>y</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">alpha_quartz_cubic</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.find_closest">
<code class="descclassname">quippy.structures.</code><code class="descname">find_closest</code><span class="sig-paren">(</span><em>at</em>, <em>r</em>, <em>n0</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.find_closest" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>r</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>n0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd><p class="first last">shape(qp_closest_list,0)</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>closest_list</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘i’) with bounds (qp_n0)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">find_closest</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.sh2">
<code class="descclassname">quippy.structures.</code><code class="descname">sh2</code><span class="sig-paren">(</span><em>a</em>, <em>c</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.sh2" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 2-atom simple hexagonal lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">c</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">sh2</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.find_compatible_supercells">
<code class="descclassname">quippy.structures.</code><code class="descname">find_compatible_supercells</code><span class="sig-paren">(</span><em>l1</em>, <em>l2</em>, <em>match_tol</em><span class="optional">[</span>, <em>fix_l2</em>, <em>max_m1</em>, <em>max_m2</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.find_compatible_supercells" title="Permalink to this definition">¶</a></dt>
<dd><p>find supercells of two lattices that are compatible (i.e.
equal or parallel vectors to some tolerance)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>l1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd><p class="first last">lattices of 1st and 2nd structures</p>
</dd>
<dt><strong>l2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd><p class="first last">lattices of 1st and 2nd structures</p>
</dd>
<dt><strong>match_tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd><p class="first last">tolerange for good enough match.</p>
</dd>
<dt><strong>n1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘i’) with bounds (3,3)</span></dt>
<dd><p class="first last">output supercells of 1st and 2nd structures that match well enough (new lattices = lattice . n[12] )</p>
</dd>
<dt><strong>n2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘i’) with bounds (3,3)</span></dt>
<dd><p class="first last">output supercells of 1st and 2nd structures that match well enough (new lattices = lattice . n[12] )</p>
</dd>
<dt><strong>fix_l2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd><p class="first last">if true, don’t allow supercells of l2</p>
</dd>
<dt><strong>max_m1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd><p class="first last">max range of supercells to check (bigger is slower)</p>
</dd>
<dt><strong>max_m2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd><p class="first last">max range of supercells to check (bigger is slower)</p>
</dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd><p class="first last">if present, error status return</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">find_compatible_supercells</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.imma">
<code class="descclassname">quippy.structures.</code><code class="descname">imma</code><span class="sig-paren">(</span><em>a</em>, <em>b</em>, <em>c</em>, <em>u</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.imma" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 2-atom Imma cell</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>b</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">imma</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.graphite_rhombohedral">
<code class="descclassname">quippy.structures.</code><code class="descname">graphite_rhombohedral</code><span class="sig-paren">(</span><em>a</em>, <em>c</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.graphite_rhombohedral" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">graphite_rhombohedral</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.fcc_z111_ortho">
<code class="descclassname">quippy.structures.</code><code class="descname">fcc_z111_ortho</code><span class="sig-paren">(</span><em>a0</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.fcc_z111_ortho" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">fcc_z111_ortho</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.find_motif">
<code class="descclassname">quippy.structures.</code><code class="descname">find_motif</code><span class="sig-paren">(</span><em>at</em>, <em>motif</em><span class="optional">[</span>, <em>start</em>, <em>end</em>, <em>mask</em>, <em>find_all_possible_matches</em>, <em>nneighb_only</em>, <em>alt_connect</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.find_motif" title="Permalink to this definition">¶</a></dt>
<dd><p>Subgraph isomorphism identifier based on J.R. Ullmann, JACM 23(1) 31-42 (1976)</p>
<p>Slight modifications are that if we include two unconnected vertices in the subgraph
then the corresponding vertices in the isomorphism MUST also be disconnected.
i.e. if we don``t include a bond between two atoms it is because it really isn``t there.</p>
<p>Pattern matching problems are combinatorial in time required, so the routine itself
has seven different escape routes; the first six try to quickly fail and prevent the
main part of the algorithm from executing at all.</p>
<p><code class="docutils literal notranslate"><span class="pre">at</span></code> is the atoms structure with connectivity data precalculated to at least first nearest neighbours</p>
<p><code class="docutils literal notranslate"><span class="pre">motif</span></code> is an integer matrix describing the connectivity of the region you wish to match.
it has dimension (number of atoms, max number of neighbours + 1)
motif(i,1) is the atomic number of an atom
motif(i,2), motif(i,3) etc. are the indices of atoms to which this atom connects in this motif
or zero if there are no more neighbours.</p>
<p>E.g. to match a water molecule we could use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">water_motif</span>  <span class="o">=</span> <span class="n">reshape</span><span class="p">(</span> <span class="p">(</span><span class="o">/</span>  <span class="mi">8</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="o">&amp;</span>
                            <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="o">&amp;</span>
                            <span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span>  <span class="o">/</span><span class="p">),</span> <span class="p">(</span><span class="o">/</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="o">/</span><span class="p">)</span> <span class="p">)</span>
</pre></div>
</div>
<p>or, alternatively:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">water_motif2</span> <span class="o">=</span> <span class="n">reshape</span><span class="p">(</span> <span class="p">(</span><span class="o">/</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="o">&amp;</span>
                           <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="o">&amp;</span>
                           <span class="mi">0</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="o">/</span><span class="p">),</span> <span class="p">(</span><span class="o">/</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="o">/</span><span class="p">)</span> <span class="p">)</span>
</pre></div>
</div>
<p>and for an alpha carbon</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>         <span class="n">O</span>
         <span class="o">|</span>
 <span class="n">N</span> <span class="o">-</span> <span class="n">C</span> <span class="o">-</span> <span class="n">C</span>
     <span class="o">|</span>
     <span class="n">H</span>

<span class="n">c_alpha</span> <span class="o">=</span> <span class="n">reshape</span><span class="p">(</span> <span class="p">(</span><span class="o">/</span> <span class="mi">6</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span> <span class="o">&amp;</span>
                      <span class="mi">2</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span> <span class="o">&amp;</span>
                      <span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span> <span class="o">&amp;</span>
                      <span class="mi">5</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="o">/</span><span class="p">),</span> <span class="p">(</span><span class="o">/</span><span class="mi">5</span><span class="p">,</span><span class="mi">4</span><span class="o">/</span><span class="p">)</span> <span class="p">)</span>
</pre></div>
</div>
<p>The routine will identify an optimum atom in the motif which it will try to find in the
atoms structure before doing any further matching. The optimum atom is the one which
minimises the total number of bond hops required to include all atoms in the motif</p>
<p><code class="docutils literal notranslate"><span class="pre">matches</span></code> is a table containing one line for each match found in the atoms structure
or for optimum atoms with indices between <code class="docutils literal notranslate"><span class="pre">start</span></code> and <code class="docutils literal notranslate"><span class="pre">end</span></code>. The integers in each line
give the indices of the atoms, in the same order as in the motif, which consitute a single
match.</p>
<p><code class="docutils literal notranslate"><span class="pre">mask</span></code> allows individual atoms to be selected for searching, e.g. for preventing a water
molecule from being re-identified as an OH, and then later as two hydrogens.</p>
<p>if find_all_possible_matches is true, all possible matches, not just non-overlapping ones,
are returned.  Useful for situations where things are ambiguous and need to be resolved
with more information outside this routine</p>
<p>The routine could optionally find hysteretically defined connections between neighbours,
if the alt_connect’s cutoff were the same as at.cutoff(_break)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd><p class="first last">The atoms structure to search</p>
</dd>
<dt><strong>motif</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘i’) with bounds (qp_n0,qp_n1)</span></dt>
<dd><p class="first last">The motif to search for</p>
</dd>
<dt><strong>start</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd><p class="first last">Start and End atomic indices for search</p>
</dd>
<dt><strong>end</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd><p class="first last">Start and End atomic indices for search</p>
</dd>
<dt><strong>mask</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n2), optional</span></dt>
<dd><p class="first last">If present only masked atoms are searched</p>
</dd>
<dt><strong>find_all_possible_matches</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd><p class="first last">if true, don’t exclude matches that overlap</p>
</dd>
<dt><strong>nneighb_only</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>alt_connect</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="connection.html#quippy.atoms.Connection" title="quippy.atoms.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a> object, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>matches</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="table.html#quippy.table.Table" title="quippy.table.Table"><code class="xref py py-class docutils literal notranslate"><span class="pre">Table</span></code></a> object</span></dt>
<dd><p class="first last">All matches</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">find_motif</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.diamond">
<code class="descclassname">quippy.structures.</code><code class="descname">diamond</code><span class="sig-paren">(</span><em>a</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.diamond" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates an 8-atom diamond-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code>
and atomic number <code class="docutils literal notranslate"><span class="pre">Z</span></code>, e.g. in Python:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">a</span> <span class="o">=</span> <span class="n">diamond</span><span class="p">(</span><span class="mf">5.44</span><span class="p">,</span> <span class="mi">14</span><span class="p">)</span>  <span class="c1"># Silicon unit cell</span>
</pre></div>
</div>
<p>Or, in Fortran:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">type</span><span class="p">(</span><span class="n">Atoms</span><span class="p">)</span> <span class="p">::</span> <span class="n">at</span>
<span class="o">...</span>
<span class="n">call</span> <span class="n">diamond</span><span class="p">(</span><span class="n">at</span><span class="p">,</span> <span class="mf">5.44</span><span class="n">_dp</span><span class="p">,</span> <span class="mi">14</span><span class="p">)</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">diamond</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.unit_slab">
<code class="descclassname">quippy.structures.</code><code class="descname">unit_slab</code><span class="sig-paren">(</span><em>axes</em>, <em>a</em><span class="optional">[</span>, <em>atnum</em>, <em>lat_type</em>, <em>c</em>, <em>u</em>, <em>x</em>, <em>y</em>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.unit_slab" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a slab of material with the x, y, and z axes desribed by the
Miller indices in the array axes (with <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">=</span> <span class="pre">axes[:,1])</span></code>, <code class="docutils literal notranslate"><span class="pre">y</span> <span class="pre">=</span>
<span class="pre">axes[:,2]</span></code> and <code class="docutils literal notranslate"><span class="pre">z</span> <span class="pre">=</span> <span class="pre">axes[:,3]</span></code>).  The extent of the slab should
be given either as <code class="docutils literal notranslate"><span class="pre">(nx,</span> <span class="pre">ny,</span> <span class="pre">nz)</span></code> unit cells or as <code class="docutils literal notranslate"><span class="pre">(width,</span>
<span class="pre">height,</span> <span class="pre">nz)</span></code> where <cite>width</cite> and <cite>height</cite> are measured in Angstrom
and <cite>nz</cite> is the number of cells in the <cite>z</cite> direction.</p>
<p><cite>atnum</cite> can be used to initialise the <cite>z</cite> and <cite>species</cite> properties.
<cite>lat_type</cite> should be of <code class="docutils literal notranslate"><span class="pre">&quot;diamond&quot;`</span></code>, <code class="docutils literal notranslate"><span class="pre">&quot;fcc&quot;</span></code>, or <code class="docutils literal notranslate"><span class="pre">&quot;bcc&quot;</span></code>
(default is <code class="docutils literal notranslate"><span class="pre">&quot;diamond&quot;</span></code>)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>axes</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd></dd>
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>atnum</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0), optional</span></dt>
<dd></dd>
<dt><strong>lat_type</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1), optional</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>x</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>y</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">unit_slab</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.fcc1">
<code class="descclassname">quippy.structures.</code><code class="descname">fcc1</code><span class="sig-paren">(</span><em>a</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.fcc1" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 1-atom fcc-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">fcc1</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.remove_too_close_atoms">
<code class="descclassname">quippy.structures.</code><code class="descname">remove_too_close_atoms</code><span class="sig-paren">(</span><em>at</em>, <em>distance</em><span class="optional">[</span>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.remove_too_close_atoms" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>distance</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">remove_too_close_atoms</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.bulk">
<code class="descclassname">quippy.structures.</code><code class="descname">bulk</code><span class="sig-paren">(</span><em>lat_type</em>, <em>a</em><span class="optional">[</span>, <em>c</em>, <em>u</em>, <em>x</em>, <em>y</em>, <em>z</em>, <em>atnum</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.bulk" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a bulk primitive cell with a given lattice type and lattice parameters</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>lat_type</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1)</span></dt>
<dd><p class="first last">One of <code class="docutils literal notranslate"><span class="pre">diamond</span></code>, <code class="docutils literal notranslate"><span class="pre">bcc</span></code>, <code class="docutils literal notranslate"><span class="pre">fcc</span></code>, <code class="docutils literal notranslate"><span class="pre">alpha_quartz</span></code>, <code class="docutils literal notranslate"><span class="pre">anatase_cubic</span></code>, <code class="docutils literal notranslate"><span class="pre">anatase</span></code>, or <code class="docutils literal notranslate"><span class="pre">rutile</span></code></p>
</dd>
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd><p class="first last">Principal lattice constant</p>
</dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>x</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>y</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>atnum</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0), optional</span></dt>
<dd><p class="first last">Optionally specify atomic numbers</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">bulk</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.supercell">
<code class="descclassname">quippy.structures.</code><code class="descname">supercell</code><span class="sig-paren">(</span><em>a</em>, <em>n1</em>, <em>n2</em>, <em>n3</em><span class="optional">[</span>, <em>supercell_index_name</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.supercell" title="Permalink to this definition">¶</a></dt>
<dd><p>Replicates the unit cell <code class="docutils literal notranslate"><span class="pre">n1*n2*n3</span></code> times along the lattice vectors.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd><p class="first last">Input cell</p>
</dd>
<dt><strong>n1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>n2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>n3</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>supercell_index_name</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1), optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>aa</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd><p class="first last">Output (big) cell</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">supercell</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.structure_from_file">
<code class="descclassname">quippy.structures.</code><code class="descname">structure_from_file</code><span class="sig-paren">(</span><em>struct</em><span class="optional">[</span>, <em>vol_per_atom</em>, <em>vol_per_unit_cell</em>, <em>repeat</em>, <em>z_values_str</em>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.structure_from_file" title="Permalink to this definition">¶</a></dt>
<dd><p>create a supercell of a structure, read from a file, with chosen
volume per atom or volume per unit cell, with desired supercell
repeats, and specified Z values.
file may contain default Z values as a property Z_values=``Z1 Z2 …``
structures that begin with . or / are searched for as paths,
and everything else is searched for in <code class="docutils literal notranslate"><span class="pre">QUIP_ARCH/structures/struct.xyz</span></code>
or in <code class="docutils literal notranslate"><span class="pre">HOME/share/quip_structures/struct.xyz</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>struct</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1)</span></dt>
<dd></dd>
<dt><strong>vol_per_atom</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>vol_per_unit_cell</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>repeat</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (3), optional</span></dt>
<dd></dd>
<dt><strong>z_values_str</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1), optional</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_dup_cell</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">structure_from_file</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.map_nearest_atoms">
<code class="descclassname">quippy.structures.</code><code class="descname">map_nearest_atoms</code><span class="sig-paren">(</span><em>at1</em>, <em>at2</em>, <em>types</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.map_nearest_atoms" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>at1</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>at2</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>types</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘i’) with bounds (qp_n0)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_map_nearest_atoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">map_nearest_atoms</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.fcc_z100">
<code class="descclassname">quippy.structures.</code><code class="descname">fcc_z100</code><span class="sig-paren">(</span><em>a0</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.fcc_z100" title="Permalink to this definition">¶</a></dt>
<dd><p>Make an FCC 100 surface, such that the repeating squares of the
surface are aligned with the cell boundaries</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">fcc_z100</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.min_neighbour_dist">
<code class="descclassname">quippy.structures.</code><code class="descname">min_neighbour_dist</code><span class="sig-paren">(</span><em>at</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.min_neighbour_dist" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_min_neighbour_dist</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">min_neighbour_dist</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.rutile">
<code class="descclassname">quippy.structures.</code><code class="descname">rutile</code><span class="sig-paren">(</span><em>a</em>, <em>c</em>, <em>u</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.rutile" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">rutile</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.fcc_disloc_malc">
<code class="descclassname">quippy.structures.</code><code class="descname">fcc_disloc_malc</code><span class="sig-paren">(</span><em>a0</em>, <em>nu</em>, <em>n1</em>, <em>n2</em>, <em>n3</em>, <em>d</em>, <em>type</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.fcc_disloc_malc" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>nu</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>n1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>n2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>n3</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>d</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>type</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input string(len=-1)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">fcc_disloc_malc</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.graphite">
<code class="descclassname">quippy.structures.</code><code class="descname">graphite</code><span class="sig-paren">(</span><em>a</em>, <em>c</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.graphite" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 4-atom graphite lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">c</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">graphite</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.tube_radius">
<code class="descclassname">quippy.structures.</code><code class="descname">tube_radius</code><span class="sig-paren">(</span><em>tube</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.tube_radius" title="Permalink to this definition">¶</a></dt>
<dd><p>Calcualte average radius of a nanotube</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>tube</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_r</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">tube_radius</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.transform">
<code class="descclassname">quippy.structures.</code><code class="descname">transform</code><span class="sig-paren">(</span><em>at_in</em>, <em>t</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.transform" title="Permalink to this definition">¶</a></dt>
<dd><p>Transform cell and lattice coordinates by the 3 x 3 matrix <cite>t</cite></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>at_in</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd><p class="first last">Input</p>
</dd>
<dt><strong>t</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at_out</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd><p class="first last">Output</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">transform</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.graphene_tube">
<code class="descclassname">quippy.structures.</code><code class="descname">graphene_tube</code><span class="sig-paren">(</span><em>a</em>, <em>n</em>, <em>m</em>, <em>nz</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.graphene_tube" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a <span class="math notranslate nohighlight">\((n,m)\)</span> nanotube with lattice parameter <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">nz</span></code>
unit cells along the tube length. Also returns the radius of the tube.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>tube</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>n</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>m</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>nz</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>ret_r</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">graphene_tube</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.fcc_z111">
<code class="descclassname">quippy.structures.</code><code class="descname">fcc_z111</code><span class="sig-paren">(</span><em>a0</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.fcc_z111" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">fcc_z111</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.graphene_cubic">
<code class="descclassname">quippy.structures.</code><code class="descname">graphene_cubic</code><span class="sig-paren">(</span><em>a</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.graphene_cubic" title="Permalink to this definition">¶</a></dt>
<dd><p>Cubic graphene unit cell with lattice parameter <code class="docutils literal notranslate"><span class="pre">a</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_cube</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">graphene_cubic</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.hcp">
<code class="descclassname">quippy.structures.</code><code class="descname">hcp</code><span class="sig-paren">(</span><em>a</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.hcp" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 2-atom hcp lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">hcp</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.graphene_sheet">
<code class="descclassname">quippy.structures.</code><code class="descname">graphene_sheet</code><span class="sig-paren">(</span><em>a</em>, <em>n</em>, <em>m</em>, <em>rep_x</em>, <em>rep_y</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.graphene_sheet" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a graphene sheet of index <span class="math notranslate nohighlight">\((n,m)\)</span> with lattice constant <code class="docutils literal notranslate"><span class="pre">a</span></code> with <code class="docutils literal notranslate"><span class="pre">rep_x</span></code>
repeat units in the <span class="math notranslate nohighlight">\(x\)</span> direction and <code class="docutils literal notranslate"><span class="pre">rep_y</span></code> in the <span class="math notranslate nohighlight">\(y\)</span> direction.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>n</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>m</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>rep_x</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>rep_y</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>sheet</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">graphene_sheet</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.beta_tin">
<code class="descclassname">quippy.structures.</code><code class="descname">beta_tin</code><span class="sig-paren">(</span><em>a</em>, <em>c</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.beta_tin" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 2-atom beta-tin structure with lattice constants of a and c</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">beta_tin</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.graphene_slab">
<code class="descclassname">quippy.structures.</code><code class="descname">graphene_slab</code><span class="sig-paren">(</span><em>a</em>, <em>theta</em>, <em>width</em>, <em>height</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.graphene_slab" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a slab of graphene of a given with and height, at a given angle.
<code class="docutils literal notranslate"><span class="pre">a</span></code> is lattice parameter.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>theta</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>width</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>height</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>slab</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">graphene_slab</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.imma4">
<code class="descclassname">quippy.structures.</code><code class="descname">imma4</code><span class="sig-paren">(</span><em>a</em>, <em>b</em>, <em>c</em>, <em>u</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.imma4" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 4-atom Imma cell</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>b</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">imma4</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.beta_tin4">
<code class="descclassname">quippy.structures.</code><code class="descname">beta_tin4</code><span class="sig-paren">(</span><em>a</em>, <em>c</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.beta_tin4" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 4-atom beta-tin structure with lattice constants of a and c</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">beta_tin4</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.wurtzite">
<code class="descclassname">quippy.structures.</code><code class="descname">wurtzite</code><span class="sig-paren">(</span><em>a</em><span class="optional">[</span>, <em>c</em>, <em>z1</em>, <em>z2</em>, <em>u</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.wurtzite" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 4-atom wurtzite lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">c</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>z1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>z2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">wurtzite</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.anatase_cubic">
<code class="descclassname">quippy.structures.</code><code class="descname">anatase_cubic</code><span class="sig-paren">(</span><em>a</em>, <em>c</em>, <em>u</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.anatase_cubic" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">anatase_cubic</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.bond_angle_mean_dev">
<code class="descclassname">quippy.structures.</code><code class="descname">bond_angle_mean_dev</code><span class="sig-paren">(</span><em>at</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.bond_angle_mean_dev" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">bond_angle_mean_dev</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.alpha_quartz">
<code class="descclassname">quippy.structures.</code><code class="descname">alpha_quartz</code><span class="sig-paren">(</span><em>a</em>, <em>c</em>, <em>u</em>, <em>x</em>, <em>y</em>, <em>z</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.alpha_quartz" title="Permalink to this definition">¶</a></dt>
<dd><p>Primitive 9-atom trigonal alpha quartz cell, with lattice constants
<cite>a</cite> and <cite>c</cite> and internal coordinates <cite>u</cite> (Si), <cite>x</cite>, <cite>y</cite> and <cite>z</cite> (O).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>u</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>x</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>y</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">alpha_quartz</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.water">
<code class="descclassname">quippy.structures.</code><code class="descname">water</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.water" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an atoms object containing one TIP3P water molecule in a box
giving the correct density at 300K</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_water</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">water</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.fcc">
<code class="descclassname">quippy.structures.</code><code class="descname">fcc</code><span class="sig-paren">(</span><em>a</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.fcc" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 4-atom fcc-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">fcc</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.delaunay_reduce">
<code class="descclassname">quippy.structures.</code><code class="descname">delaunay_reduce</code><span class="sig-paren">(</span><em>lat</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.delaunay_reduce" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>lat</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_reduced_lat</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">delaunay_reduce</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.fcc_11b2_edge_disloc">
<code class="descclassname">quippy.structures.</code><code class="descname">fcc_11b2_edge_disloc</code><span class="sig-paren">(</span><em>a0</em>, <em>n1</em>, <em>n2</em>, <em>n3</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.fcc_11b2_edge_disloc" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a0</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>n1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>n2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>n3</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">fcc_11b2_edge_disloc</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.disloc_noam">
<code class="descclassname">quippy.structures.</code><code class="descname">disloc_noam</code><span class="sig-paren">(</span><em>at</em>, <em>p</em>, <em>l</em>, <em>b</em><span class="optional">[</span>, <em>close_threshold</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.disloc_noam" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>p</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>l</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>b</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>close_threshold</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">disloc_noam</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.bcc">
<code class="descclassname">quippy.structures.</code><code class="descname">bcc</code><span class="sig-paren">(</span><em>a</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.bcc" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 2-atom bcc-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">bcc</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.bcc1">
<code class="descclassname">quippy.structures.</code><code class="descname">bcc1</code><span class="sig-paren">(</span><em>a</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.bcc1" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 1-atom primitive bcc-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">bcc1</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.sh">
<code class="descclassname">quippy.structures.</code><code class="descname">sh</code><span class="sig-paren">(</span><em>a</em>, <em>c</em><span class="optional">[</span>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.sh" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 1-atom simple hexagonal lattice with lattice constants of <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">c</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>c</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">sh</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.arbitrary_supercell">
<code class="descclassname">quippy.structures.</code><code class="descname">arbitrary_supercell</code><span class="sig-paren">(</span><em>a_in</em>, <em>i1</em><span class="optional">[</span>, <em>error</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.arbitrary_supercell" title="Permalink to this definition">¶</a></dt>
<dd><p>construct an arbitrary supercell from a primitive structure and a combination of primitive vectors that form supercell</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a_in</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd><p class="first last">Input (small) cell</p>
</dd>
<dt><strong>i1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘i’) with bounds (3,3)</span></dt>
<dd><p class="first last">combination of primitive lattice vectors to create supercell (a_out.lattice = a_in.lattice . i1).  column i specifies output pbc vector i.</p>
</dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(int,’i’), optional</span></dt>
<dd><p class="first last">if present, returned error status</p>
</dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>a_out</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd><p class="first last">Output (big) cell</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">arbitrary_supercell</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.diamond2">
<code class="descclassname">quippy.structures.</code><code class="descname">diamond2</code><span class="sig-paren">(</span><em>a</em><span class="optional">[</span>, <em>z1</em>, <em>z2</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.diamond2" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a 2-atom diamond-structure with cubic lattice constant of <code class="docutils literal notranslate"><span class="pre">a</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>a</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>z1</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>z2</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>myatoms</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">diamond2</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.surface_unit_cell">
<code class="descclassname">quippy.structures.</code><code class="descname">surface_unit_cell</code><span class="sig-paren">(</span><em>surf_v</em>, <em>lat</em><span class="optional">[</span>, <em>third_vec_normal</em>, <em>tol</em>, <em>max_n</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.surface_unit_cell" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>surf_v</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (3)</span></dt>
<dd><p class="first last">surface vector</p>
</dd>
<dt><strong>lat</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd><p class="first last">lattice</p>
</dd>
<dt><strong>third_vec_normal</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
<dt><strong>tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float, optional</span></dt>
<dd></dd>
<dt><strong>max_n</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>i_out</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘i’) with bounds (3,3)</span></dt>
<dd><p class="first last">combination of primitive lattice vectors to create supercell (surf_lattice = latt . i_out).  column i specifies output pbc vector i.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">surface_unit_cell</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.slab">
<code class="descclassname">quippy.structures.</code><code class="descname">slab</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.structures.slab" title="Permalink to this definition">¶</a></dt>
<dd><p>Routine is wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">slab</span></code> containing multiple routines:</p>
<blockquote>
<div><dl class="function">
<dt>
<code class="descclassname">quippy.structures.</code><code class="descname">slab</code><span class="sig-paren">(</span><em>axes</em>, <em>a</em>, <em>nx</em>, <em>ny</em>, <em>nz</em><span class="optional">[</span>, <em>atnum</em>, <em>lat_type</em>, <em>c</em>, <em>u</em>, <em>x</em>, <em>y</em>, <em>z</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>axes</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>,</em><em>3</em><em>)</em>) – </li>
<li><strong>a</strong> (<em>input float</em>) – </li>
<li><strong>nx</strong> (<em>input int</em>) – </li>
<li><strong>ny</strong> (<em>input int</em>) – </li>
<li><strong>nz</strong> (<em>input int</em>) – </li>
<li><strong>atnum</strong> (<em>input rank-1 array</em><em>(</em><em>'i'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>lat_type</strong> (<em>in/output rank-0 array</em><em>(</em><em>string</em><em>(</em><em>len=-1</em><em>)</em><em>,</em><em>'c'</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>c</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>u</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>x</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>y</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>z</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>myslab</strong> – <a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">slab_nx_ny_nz</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt>
<code class="descclassname">quippy.structures.</code><code class="descname">slab</code><span class="sig-paren">(</span><em>axes</em>, <em>a</em>, <em>width</em>, <em>height</em>, <em>nz</em><span class="optional">[</span>, <em>atnum</em>, <em>lat_type</em>, <em>c</em>, <em>u</em>, <em>x</em>, <em>y</em>, <em>z</em>, <em>even_nx</em>, <em>even_ny</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>axes</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>3</em><em>,</em><em>3</em><em>)</em>) – </li>
<li><strong>a</strong> (<em>input float</em>) – </li>
<li><strong>width</strong> (<em>input float</em>) – </li>
<li><strong>height</strong> (<em>input float</em>) – </li>
<li><strong>nz</strong> (<em>input int</em>) – </li>
<li><strong>atnum</strong> (<em>input rank-1 array</em><em>(</em><em>'i'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>lat_type</strong> (<em>input string</em><em>(</em><em>len=-1</em><em>)</em><em>, </em><em>optional</em>) – </li>
<li><strong>c</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>u</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>x</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>y</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>z</strong> (<em>input float</em><em>, </em><em>optional</em>) – </li>
<li><strong>even_nx</strong> (<em>input int</em><em>, </em><em>optional</em>) – </li>
<li><strong>even_ny</strong> (<em>input int</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>myslab</strong> – <a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">slab_width_height_nz</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/libAtoms/Structures.f95">src/libAtoms/Structures.f95</a>.</p>
</dd></dl>

</div></blockquote>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.orthorhombic_slab">
<code class="descclassname">quippy.structures.</code><code class="descname">orthorhombic_slab</code><span class="sig-paren">(</span><em>at</em>, <em>tol=1e-05</em>, <em>min_nrep=1</em>, <em>max_nrep=5</em>, <em>graphics=False</em>, <em>rot=None</em>, <em>periodicity=None</em>, <em>vacuum=None</em>, <em>shift=None</em>, <em>verbose=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#orthorhombic_slab"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.orthorhombic_slab" title="Permalink to this definition">¶</a></dt>
<dd><p>Try to construct an orthorhombic cell equivalent to the
primitive cell <cite>at</cite>, using supercells up to at most <cite>max_nrep</cite>
repeats. Symmetry must be exact within a tolerance of <cite>tol</cite>. If
<cite>rot</cite> is not None, we first transform <cite>at</cite> by the rotation
matrix <cite>rot</cite>. The optional argument <cite>periodicity</cite> can be used to
fix the periodicity one or more directions. It should be a three
component vector with value zero in the unconstrained
directions. The vector <cite>vacuum</cite> can be used to add vacuum in one
or more directions. <cite>shift</cite> is a three component vector which
can be used to shift the positions in the final cell.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.rotation_matrix">
<code class="descclassname">quippy.structures.</code><code class="descname">rotation_matrix</code><span class="sig-paren">(</span><em>unit</em>, <em>y</em>, <em>z=None</em>, <em>x=None</em>, <em>tol=1e-05</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#rotation_matrix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.rotation_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Return 3x3 matrix rotation matrix defining a crack with open
surface defined by the plane <cite>y`=(l,m.n) or (h,k,i,l), and either
crack tip line `z</cite> or crack propagation direction <cite>x</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.get_bulk_params">
<code class="descclassname">quippy.structures.</code><code class="descname">get_bulk_params</code><span class="sig-paren">(</span><em>bulk</em>, <em>lat_type</em>, <em>verbose=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#get_bulk_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.get_bulk_params" title="Permalink to this definition">¶</a></dt>
<dd><p>Return 6-tuple of lattice parameters a, c, u, x, y, z for
cell <cite>bulk</cite> of lattice type <cite>lat_type</cite></p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.get_bond_lengths">
<code class="descclassname">quippy.structures.</code><code class="descname">get_bond_lengths</code><span class="sig-paren">(</span><em>at</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#get_bond_lengths"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.get_bond_lengths" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dictionary mapping tuples (Species1, Species2) to an farray of bond-lengths</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.MillerPlane">
<code class="descclassname">quippy.structures.</code><code class="descname">MillerPlane</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#MillerPlane"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.MillerPlane" title="Permalink to this definition">¶</a></dt>
<dd><p>Special case of <a class="reference internal" href="#quippy.structures.MillerIndex" title="quippy.structures.MillerIndex"><code class="xref py py-class docutils literal notranslate"><span class="pre">MillerIndex</span></code></a> with <code class="docutils literal notranslate"><span class="pre">type=&quot;plane&quot;</span></code></p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.MillerDirection">
<code class="descclassname">quippy.structures.</code><code class="descname">MillerDirection</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#MillerDirection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.MillerDirection" title="Permalink to this definition">¶</a></dt>
<dd><p>Special case of <a class="reference internal" href="#quippy.structures.MillerIndex" title="quippy.structures.MillerIndex"><code class="xref py py-class docutils literal notranslate"><span class="pre">MillerIndex</span></code></a> with <code class="docutils literal notranslate"><span class="pre">type=&quot;direction&quot;</span></code> (the default)</p>
</dd></dl>

<dl class="function">
<dt id="quippy.structures.angle_between">
<code class="descclassname">quippy.structures.</code><code class="descname">angle_between</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/quippy/structures.html#angle_between"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#quippy.structures.angle_between" title="Permalink to this definition">¶</a></dt>
<dd><p>Angle between crystallographic directions between a=[ijk] and b=[lmn], in radians.</p>
</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2008-2016, James Kermode

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>